import request from '@/utils/request'

/**
 * 设备
 */
// 列表
export function getDeviceListDataApi(data) {
    return request({
        url: '/device/query/',
        method: 'get',
        params: data
    })
}
// 新增
export function addDeviceApi(data) {
    return request({
        url: '/device/add',
        method: 'post',
        data: data
    })
}
// 编辑
export function editDeviceApi(data) {
    return request({
        url: '/device/edit',
        method: 'post',
        data: data
    })
}
// 删除
export function delDeviceApi(data) {
    return request({
        url: '/device/delete/' + data.id,
        method: 'post',
        data: data
    })
}

/**
 * 设备变量
 */
// 列表
export function getDeviceVariableListDataApi(data) {
    return request({
        url: '/device_variable/query/',
        method: 'get',
        params: data
    })
}
// 新增
export function addDeviceVariableApi(data) {
    return request({
        url: '/device_variable/add',
        method: 'post',
        data: data
    })
}
// 编辑
export function editDeviceVariableApi(data) {
    return request({
        url: '/device_variable/edit',
        method: 'post',
        data: data
    })
}
// 删除
export function delDeviceVariableApi(data) {
    return request({
        url: '/device_variable/delete/' + data.id,
        method: 'post',
        data: data
    })
}